package com.beijing.cyou.mapper;

import com.beijing.cyou.model.*;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Repository
public interface UserMapper {

	Integer insertUser(UserVO user);


	Integer insertUserOrgz(UserOrgz userOrgz);


	Integer insertUserInRole(UserInRole userInRole);


	Integer insertUserToken(UserToken userToken);


	Integer updateUserNormalInfo(UserVO user);


	Long userExist(String userEmail);

	
	Long userMailPrefixExist(String mailPrefix);

	@Select("SELECT cuk.id from cy_user_token cuk WHERE cuk.userId = #{userId} " +
			" AND cuk.userToken = #{userToken} LIMIT 1")
	Long userTokenExist(UserToken userToken);


	UserInfo getUserInfoById(Long userId);


	User selectUserByUserId(Long userId);



}
